//
//  Untils.h
//  GasCome
//
//  Created by zfc on 2020/4/25.
//  Copyright © 2020 zfc. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface Untils : NSObject


+ (BOOL) cheackPhoneNumValid:(NSString *)phone;  //手机号验证
+ (BOOL) cheackPasswordValid:(NSString *)pwd; //密码验证
+ (BOOL) isChinese:(NSString *)str; //判断是否为中文
+ (BOOL) validateTelphone:(NSString *)telphone; //座机号码验证
+(NSString *) phoneNumberHiddenCenter:(NSString *)phone;  //手机号中间四位变星

+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

+ (NSString *)convertToJsonData:(NSDictionary *)dict;//字典转字符串

+ (NSString *)arrayToJSONString:(NSArray *)array;//数组转字符串

+ (NSString *)setTimeWithTime:(NSString *)time;

+ (NSString *)setTimeWithTime:(NSString *)time format:(NSString *)format;
//计算文本高度
+ (CGFloat)getLabelHeightWithText:(NSString *)text width:(CGFloat)width font:(CGFloat)font;

//计算文本宽度
+ (CGFloat)getWidthWithText:(NSString *)text height:(CGFloat)height font:(CGFloat)font;

//anyDate 转成 本地时区的 NSDate
+ (NSDate *)getLocalDateFormatAnyDate:(NSDate *)anyDate;

+ (NSDate *)changeStrToDateWithStr:(NSString *)dateStr format:(NSString *)format;

//把json字符串转化成数组或者字典
+(id)parseJSONStringToNSDictionary:(NSString *)JSONString;

@end

NS_ASSUME_NONNULL_END
